﻿@model MezmurStore2.Models.Album

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Album</legend>

    <div class="display-label">Poster</div>
    <div class="display-field">
        <img src="@Url.Content(Model.Poster)" alt="@Model.Poster" width="100" height="100" />
    </div>

    <div class="display-label">Title</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">Gener</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Gener)
    </div>

    <div class="display-label">ReleaseDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ReleaseDate)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>

<legend>Tracks</legend>
<table>
    <tr>
        <th>
            Track Title
        </th>
        <th>
            Artist
        </th>
        <th>
            File Path
        </th>
        <th>
            File Size
        </th>
        <th></th>
    </tr>

@foreach (var item in Model.Tracks) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
         <td>
            @Html.DisplayFor(modelItem => item.Artist.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FilePath)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FileSize)
        </td>
        <td>
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}
